Skip to content

0.3.1 hotfix: GetNewClosure dispatcher crashes and Autopilot playbook 500s#66

Merged
ugurkocde merged 2 commits into
mainfrom
hotfix/0.3.1
Jul 7, 2026
Merged

0.3.1 hotfix: GetNewClosure dispatcher crashes and Autopilot playbook 500s#66
ugurkocde merged 2 commits into
mainfrom
hotfix/0.3.1

Conversation

@ugurkocde

Copy link
Copy Markdown
Owner

Summary

Hotfix for the two bugs reported against 0.3.0 today.

Issue #64: app crash after group tag update (Windows PowerShell 5.1)

GetNewClosure() binds a scriptblock to a dynamic module that cannot resolve script-scope functions on Windows PowerShell 5.1 and reads $script: variables as frozen snapshots (or null when closures nest). The toast auto-dismiss timer handler therefore failed 4 seconds after any toast with "The term 'Hide-Toast' is not recognized" and took down the main window. Verified via live Graph calls that the group tag update itself succeeds; only the UI crashed.

Fixes applied:

  • Toast tick and slide-out Completed handlers are plain scriptblocks now; the stale-toast check compares two live script-scope generation counters instead of a captured snapshot (which made the check always true).
  • The Copy Key reset timer uses a captured local instead of $script:copyButtonTimer, which reads as null inside the nested closure and threw 2 seconds after every key copy.
  • The Entra ID / Disable in Entra ID checkbox mutual-exclusivity handlers and the copy-button click handler drop GetNewClosure() so Write-Log and $script:serviceCheckboxes resolve.

Closure semantics were verified with standalone repro scripts on pwsh 7.6 (snapshot and nested-null behavior reproduce there too; the function resolution failure is 5.1-specific, matching the report).

Issue #65: Autopilot playbooks fail with HTTP 500

The Graph windowsAutopilotDeviceIdentities endpoint currently returns an internal server error whenever a $select projection is used. Reproduced against a live tenant on both beta and v1.0, with several property combinations; the same call without $select works. Playbooks 1 and 2 now fetch Autopilot devices without $select (embedded copies regenerated), matching the dashboard queries that were unaffected.

Release

  • Version bumped to 0.3.1, changelog updated.

Fixes #64
Fixes #65

🤖 Generated with Claude Code

ugurkocde and others added 2 commits July 7, 2026 22:21
GetNewClosure() binds handlers to a dynamic module that cannot resolve
script-scope functions on Windows PowerShell 5.1 and reads script-scope
variables as frozen snapshots (or null when closures nest). This crashed
the app 4 seconds after any toast appeared, e.g. right after a group tag
update, with "The term 'Hide-Toast' is not recognized".

- Toast auto-dismiss tick and slide-out Completed handlers are now plain
  scriptblocks bound to the script session state; stale-toast protection
  uses a live script-scope generation pair instead of a captured copy.
- Copy Key reset timer is a captured local instead of a null script: read.
- Checkbox mutual-exclusivity handlers and the copy-button click handler
  drop GetNewClosure so Write-Log and script variables resolve on 5.1.

Bump version to 0.3.1.

Fixes #64

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Graph windowsAutopilotDeviceIdentities endpoint currently returns
HTTP 500 whenever a \$select projection is used, on both beta and v1.0
and regardless of which properties are selected (verified against a
live tenant). Playbooks 1 and 2 now fetch Autopilot devices without
\$select, matching the dashboard queries that were unaffected. Embedded
playbook copies regenerated to stay in sync.

Fixes #65

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ugurkocde ugurkocde merged commit 82ca7eb into main Jul 7, 2026
1 check passed
@ugurkocde ugurkocde deleted the hotfix/0.3.1 branch July 7, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Playbook Autopilot Request Error v0.3.0 Application error on version 0.3.0

1 participant